import request from '@/utils/request'

// 查询信号详情列表
export function listSignal(query) {
  return request({
    url: '/assembly/signal/list',
    method: 'get',
    params: query
  })
}

// 查询信号详情详细
export function getSignal(id) {
  return request({
    url: '/assembly/signal/' + id,
    method: 'get'
  })
}

// 新增信号详情
export function addSignal(data) {
  return request({
    url: '/assembly/signal',
    method: 'post',
    data: data
  })
}

// 修改信号详情
export function updateSignal(data) {
  return request({
    url: '/assembly/signal',
    method: 'put',
    data: data
  })
}

// 删除信号详情
export function delSignal(id) {
  return request({
    url: '/assembly/signal/' + id,
    method: 'delete'
  })
}

//  获取设备plc(模糊查询)
export function getPlcSignal(params) {
  return request({
    url: 'device/status/signal/listPlcSignal',
    method: 'post',
    data:params
  })
}


// 获取设备Plc点位
export function listPlcSignal(params) {
  return request({
    url: 'device/status/signal/list',
    method: 'post',
    data:params
  })
}

// 修改plc点位值
export function editPlcSignal(data) {
  return request({
    url: 'device/status/signal/edit',
    method: 'put',
    data
  })
}